﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class YoozooManagersNetworkV2CoreNetChannelWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(Yoozoo.Managers.NetworkV2.Core.NetChannel);
			Utils.BeginObjectRegister(type, L, translator, 0, 16, 6, 3);
			
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "Setup", _m_Setup);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "StartUp", _m_StartUp);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "ShutDown", _m_ShutDown);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "TestCloseSocket", _m_TestCloseSocket);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "ShutDownInternal", _m_ShutDownInternal);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "SendBytes", _m_SendBytes);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "SendBytesSync", _m_SendBytesSync);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "Send", _m_Send);
			
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnNetworkChannelConnected", _e_OnNetworkChannelConnected);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnNetworkChannelReconnected", _e_OnNetworkChannelReconnected);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnNetworkChannelClosed", _e_OnNetworkChannelClosed);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnNetworkChannelError", _e_OnNetworkChannelError);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnNetworkChannelReceivePacket", _e_OnNetworkChannelReceivePacket);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnCSharpNetworkChannelReceivePacket", _e_OnCSharpNetworkChannelReceivePacket);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnNetworkChannelStartUp", _e_OnNetworkChannelStartUp);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnNetworkChannelShutDown", _e_OnNetworkChannelShutDown);
			
			Utils.RegisterFunc(L, Utils.GETTER_IDX, "Name", _g_get_Name);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "IP", _g_get_IP);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "Port", _g_get_Port);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "Target", _g_get_Target);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsStartUp", _g_get_IsStartUp);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsConnected", _g_get_IsConnected);
            
			Utils.RegisterFunc(L, Utils.SETTER_IDX, "IP", _s_set_IP);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "Port", _s_set_Port);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsStartUp", _s_set_IsStartUp);
            
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
			
			
            
			
			
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 1)
				{
					
					var gen_ret = new Yoozoo.Managers.NetworkV2.Core.NetChannel();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Managers.NetworkV2.Core.NetChannel constructor!");
            
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 0)
				{
					
					var gen_ret = new Yoozoo.Managers.NetworkV2.Core.NetChannel();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Managers.NetworkV2.Core.NetChannel constructor!");
            
        }

        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Setup(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                    gen_to_be_invoked.Setup(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_StartUp(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 2&& translator.Assignable<object>(L, 2)) 
                {
                    object _connectionUserData = translator.GetObject(L, 2, typeof(object));
                    
                    gen_to_be_invoked.StartUp( _connectionUserData );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 1) 
                {
                    
                    gen_to_be_invoked.StartUp(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Managers.NetworkV2.Core.NetChannel.StartUp!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_ShutDown(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 2&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2)) 
                {
                    bool _destroySelf = LuaAPI.lua_toboolean(L, 2);
                    
                    gen_to_be_invoked.ShutDown( _destroySelf );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 1) 
                {
                    
                    gen_to_be_invoked.ShutDown(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Managers.NetworkV2.Core.NetChannel.ShutDown!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_TestCloseSocket(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                    gen_to_be_invoked.TestCloseSocket(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_ShutDownInternal(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 2&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2)) 
                {
                    bool _shutDownByUser = LuaAPI.lua_toboolean(L, 2);
                    
                    gen_to_be_invoked.ShutDownInternal( _shutDownByUser );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 1) 
                {
                    
                    gen_to_be_invoked.ShutDownInternal(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Managers.NetworkV2.Core.NetChannel.ShutDownInternal!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_SendBytes(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 4&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING)&& translator.Assignable<object>(L, 4)) 
                {
                    int _messageID = LuaAPI.xlua_tointeger(L, 2);
                    byte[] _messageBytes = LuaAPI.lua_tobytes(L, 3);
                    object _customData = translator.GetObject(L, 4, typeof(object));
                    
                    gen_to_be_invoked.SendBytes( _messageID, _messageBytes, _customData );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING)) 
                {
                    int _messageID = LuaAPI.xlua_tointeger(L, 2);
                    byte[] _messageBytes = LuaAPI.lua_tobytes(L, 3);
                    
                    gen_to_be_invoked.SendBytes( _messageID, _messageBytes );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Managers.NetworkV2.Core.NetChannel.SendBytes!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_SendBytesSync(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 4&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING)&& translator.Assignable<object>(L, 4)) 
                {
                    int _messageID = LuaAPI.xlua_tointeger(L, 2);
                    byte[] _messageBytes = LuaAPI.lua_tobytes(L, 3);
                    object _customData = translator.GetObject(L, 4, typeof(object));
                    
                    gen_to_be_invoked.SendBytesSync( _messageID, _messageBytes, _customData );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING)) 
                {
                    int _messageID = LuaAPI.xlua_tointeger(L, 2);
                    byte[] _messageBytes = LuaAPI.lua_tobytes(L, 3);
                    
                    gen_to_be_invoked.SendBytesSync( _messageID, _messageBytes );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Managers.NetworkV2.Core.NetChannel.SendBytesSync!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Send(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 4&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& translator.Assignable<object>(L, 3)&& translator.Assignable<object>(L, 4)) 
                {
                    int _messageID = LuaAPI.xlua_tointeger(L, 2);
                    object _messageData = translator.GetObject(L, 3, typeof(object));
                    object _customData = translator.GetObject(L, 4, typeof(object));
                    
                    gen_to_be_invoked.Send( _messageID, _messageData, _customData );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& translator.Assignable<object>(L, 3)) 
                {
                    int _messageID = LuaAPI.xlua_tointeger(L, 2);
                    object _messageData = translator.GetObject(L, 3, typeof(object));
                    
                    gen_to_be_invoked.Send( _messageID, _messageData );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Managers.NetworkV2.Core.NetChannel.Send!");
            
        }
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_Name(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushstring(L, gen_to_be_invoked.Name);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_IP(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushstring(L, gen_to_be_invoked.IP);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_Port(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Port);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_Target(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushstring(L, gen_to_be_invoked.Target);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_IsStartUp(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsStartUp);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_IsConnected(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsConnected);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_IP(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.IP = LuaAPI.lua_tostring(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_Port(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.Port = LuaAPI.xlua_tointeger(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_IsStartUp(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.IsStartUp = LuaAPI.lua_toboolean(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
		
		
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _e_OnNetworkChannelConnected(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    int gen_param_count = LuaAPI.lua_gettop(L);
			Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelConnectedHandler gen_delegate = translator.GetDelegate<Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelConnectedHandler>(L, 3);
                if (gen_delegate == null) {
                    return LuaAPI.luaL_error(L, "#3 need Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelConnectedHandler!");
                }
				
				if (gen_param_count == 3)
				{
					
					if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
						gen_to_be_invoked.OnNetworkChannelConnected += gen_delegate;
						return 0;
					} 
					
					
					if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
						gen_to_be_invoked.OnNetworkChannelConnected -= gen_delegate;
						return 0;
					} 
					
				}
			} catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
			LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Managers.NetworkV2.Core.NetChannel.OnNetworkChannelConnected!");
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _e_OnNetworkChannelReconnected(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    int gen_param_count = LuaAPI.lua_gettop(L);
			Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelReconnectedHandler gen_delegate = translator.GetDelegate<Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelReconnectedHandler>(L, 3);
                if (gen_delegate == null) {
                    return LuaAPI.luaL_error(L, "#3 need Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelReconnectedHandler!");
                }
				
				if (gen_param_count == 3)
				{
					
					if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
						gen_to_be_invoked.OnNetworkChannelReconnected += gen_delegate;
						return 0;
					} 
					
					
					if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
						gen_to_be_invoked.OnNetworkChannelReconnected -= gen_delegate;
						return 0;
					} 
					
				}
			} catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
			LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Managers.NetworkV2.Core.NetChannel.OnNetworkChannelReconnected!");
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _e_OnNetworkChannelClosed(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    int gen_param_count = LuaAPI.lua_gettop(L);
			Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelClosedHandler gen_delegate = translator.GetDelegate<Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelClosedHandler>(L, 3);
                if (gen_delegate == null) {
                    return LuaAPI.luaL_error(L, "#3 need Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelClosedHandler!");
                }
				
				if (gen_param_count == 3)
				{
					
					if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
						gen_to_be_invoked.OnNetworkChannelClosed += gen_delegate;
						return 0;
					} 
					
					
					if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
						gen_to_be_invoked.OnNetworkChannelClosed -= gen_delegate;
						return 0;
					} 
					
				}
			} catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
			LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Managers.NetworkV2.Core.NetChannel.OnNetworkChannelClosed!");
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _e_OnNetworkChannelError(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    int gen_param_count = LuaAPI.lua_gettop(L);
			Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelErrorHandler gen_delegate = translator.GetDelegate<Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelErrorHandler>(L, 3);
                if (gen_delegate == null) {
                    return LuaAPI.luaL_error(L, "#3 need Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelErrorHandler!");
                }
				
				if (gen_param_count == 3)
				{
					
					if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
						gen_to_be_invoked.OnNetworkChannelError += gen_delegate;
						return 0;
					} 
					
					
					if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
						gen_to_be_invoked.OnNetworkChannelError -= gen_delegate;
						return 0;
					} 
					
				}
			} catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
			LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Managers.NetworkV2.Core.NetChannel.OnNetworkChannelError!");
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _e_OnNetworkChannelReceivePacket(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    int gen_param_count = LuaAPI.lua_gettop(L);
			Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelReceivePacketHandler gen_delegate = translator.GetDelegate<Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelReceivePacketHandler>(L, 3);
                if (gen_delegate == null) {
                    return LuaAPI.luaL_error(L, "#3 need Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelReceivePacketHandler!");
                }
				
				if (gen_param_count == 3)
				{
					
					if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
						gen_to_be_invoked.OnNetworkChannelReceivePacket += gen_delegate;
						return 0;
					} 
					
					
					if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
						gen_to_be_invoked.OnNetworkChannelReceivePacket -= gen_delegate;
						return 0;
					} 
					
				}
			} catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
			LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Managers.NetworkV2.Core.NetChannel.OnNetworkChannelReceivePacket!");
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _e_OnCSharpNetworkChannelReceivePacket(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    int gen_param_count = LuaAPI.lua_gettop(L);
			Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelReceivePacketHandler gen_delegate = translator.GetDelegate<Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelReceivePacketHandler>(L, 3);
                if (gen_delegate == null) {
                    return LuaAPI.luaL_error(L, "#3 need Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelReceivePacketHandler!");
                }
				
				if (gen_param_count == 3)
				{
					
					if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
						gen_to_be_invoked.OnCSharpNetworkChannelReceivePacket += gen_delegate;
						return 0;
					} 
					
					
					if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
						gen_to_be_invoked.OnCSharpNetworkChannelReceivePacket -= gen_delegate;
						return 0;
					} 
					
				}
			} catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
			LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Managers.NetworkV2.Core.NetChannel.OnCSharpNetworkChannelReceivePacket!");
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _e_OnNetworkChannelStartUp(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    int gen_param_count = LuaAPI.lua_gettop(L);
			Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelStartUpHandler gen_delegate = translator.GetDelegate<Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelStartUpHandler>(L, 3);
                if (gen_delegate == null) {
                    return LuaAPI.luaL_error(L, "#3 need Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelStartUpHandler!");
                }
				
				if (gen_param_count == 3)
				{
					
					if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
						gen_to_be_invoked.OnNetworkChannelStartUp += gen_delegate;
						return 0;
					} 
					
					
					if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
						gen_to_be_invoked.OnNetworkChannelStartUp -= gen_delegate;
						return 0;
					} 
					
				}
			} catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
			LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Managers.NetworkV2.Core.NetChannel.OnNetworkChannelStartUp!");
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _e_OnNetworkChannelShutDown(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    int gen_param_count = LuaAPI.lua_gettop(L);
			Yoozoo.Managers.NetworkV2.Core.NetChannel gen_to_be_invoked = (Yoozoo.Managers.NetworkV2.Core.NetChannel)translator.FastGetCSObj(L, 1);
                Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelShutDownHandler gen_delegate = translator.GetDelegate<Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelShutDownHandler>(L, 3);
                if (gen_delegate == null) {
                    return LuaAPI.luaL_error(L, "#3 need Yoozoo.Managers.NetworkV2.Core.NetDelegates.ChannelDelegates.NetworkChannelShutDownHandler!");
                }
				
				if (gen_param_count == 3)
				{
					
					if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
						gen_to_be_invoked.OnNetworkChannelShutDown += gen_delegate;
						return 0;
					} 
					
					
					if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
						gen_to_be_invoked.OnNetworkChannelShutDown -= gen_delegate;
						return 0;
					} 
					
				}
			} catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
			LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Managers.NetworkV2.Core.NetChannel.OnNetworkChannelShutDown!");
            return 0;
        }
        
		
		
    }
}
